package demo2;

class Instrument{
    public void play(){
        System.out.println("弹奏乐器！");
    }
}
class Wind extends Instrument{
    public void play(){
        System.out.println("弹奏Wind");
    }
    public void play2(){
        System.out.println("调用Wind的play2");
    }
}
class Brass extends Instrument{
    public void play(){
        System.out.println("弹奏Brass");
    }
    public void play2(){
        System.out.println("调用Brass的play2");
    }
}
public class Music {
    public static void tune(Instrument i){
        i.play();
    }
    public static void main(String[] args) {
        Wind a=new Wind();
        Brass b=new Brass();
        tune(a);
        tune(b);
    }
}
